package com.example.ten.controller;


import com.example.ten.util.Result;
import com.example.ten.util.ResultStatus;

/**
 * @author: Jyc
 * @classname: BaseController
 * @date: 2023/3/22
 * @time: 16:19
 * @description:
 */
public class BaseController {

    protected <T>Result success(T data){
        return new Result(ResultStatus.SUCCESS.getReturnCode(), ResultStatus.SUCCESS.getReturnMessage(), data);
    }

    protected <T>Result error(T data){
        return new Result(ResultStatus.ERROR.getReturnCode(), ResultStatus.ERROR.getReturnMessage(), data);
    }
}
